package com.czk.gulimall.cart.service;

import com.czk.gulimall.cart.vo.Cart;
import com.czk.gulimall.cart.vo.CartItem;

import java.util.List;

/**
 * @Author:ChenZhangKun
 * @Date: 2022/3/14 21:20
 */
public interface CartService {
    CartItem addToCart(Long skuId, Integer num);

    CartItem getCartItem(Long skuId);

    Cart getCart();

    void clearCart(String cartKey);

    /**
     * 勾选购物项
     *
     * @param skuId
     * @param check
     */
    void checkItem(Long skuId, Integer check);

    /**
     * 修改购物项数量
     *
     * @param skuId
     * @param num
     */
    void countItem(Long skuId, Integer num);

    /**
     * 删除购物项
     *
     * @param skuId
     */
    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();

}
